#ifndef QTAV_EXAMPLE_SIMPLEFILTER_H
#define QTAV_EXAMPLE_SIMPLEFILTER_H

#include <QtAV/Filter.h>
#include <QtCore/QTime>
#include <QtGui/QMatrix4x4>

namespace QtAV {

class SimpleFilter : public Filter
{
public:
    SimpleFilter();
    virtual ~SimpleFilter();
    void enableRotate(bool r);
    void enableWaveEffect(bool w);
    virtual FilterContext::Type contextType() const { return FilterContext::QtPainter; }
    void setText(const QString& text);
    QString text() const;
    //show image if text is null
    void setImage(const QImage& img);

    void prepare();

    void start();
    void stop();
protected:
    virtual void process();
private:
    bool mCanRot;
    bool mWave;
    qreal mStartValue;
    QString mText;
    QTime mTime;
    QMatrix4x4 mMat;
    QImage mImage;
};

} //namespace QtAV

#endif // QTAV_EXAMPLE_SIMPLEFILTER_H
